package com.dyit.springcloud.common.dto;

/**
 * 统一返回规范编码
 */
public enum RespCode {
    ADD_BOOK_SUCCESS(20001,"添加图书成功"),
    FIND_BOOK_SUCCESS(20002,"查询图书成功"),
    FALLBACK_ERROE(40001,"服务发生异常，启动熔断机制")
    ;


    private int code;
    private String msg;

    RespCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
